doctype html
//
	<3
	             _
	    ___ __ _| |_   _ _ __  ___  ___
	   / __/ _` | | | | | '_ \/ __|/ _ \
	  | (_| (_| | | |_| | |_) \__ \ (_) |
	   \___\__,_|_|\__, | .__/|___/\___/
	               |___/|_|


html(lang=lang, dir=isRTL ? 'rtl' : 'ltr', class=isFluidWidth ? 'is-fluid-width' : '')
	head
		title
			!= head.title
		meta(charset='utf-8')
		meta(http-equiv='X-UA-Compatible' content='IE=Edge')
		meta(name='viewport', content='width=device-width, initial-scale=1, maximum-scale=1')
		meta(name='format-detection', content='telephone=no')
		meta(name='mobile-web-app-capable', content='yes')
		meta(name='apple-mobile-web-app-capable', content='yes')
		meta(name='referrer', content='origin')

		each meta in head.metas
			meta(name=meta.name, property=meta.property, content=meta.content)

		each link in head.links
			link(rel=link.rel, href=link.href)

		link(rel='shortcut icon', type='image/vnd.microsoft.icon', href=faviconURL, sizes='16x16 32x32')
		link(rel='shortcut icon', type='image/x-icon', href=faviconURL, sizes='16x16 32x32')
		link(rel='icon', type='image/x-icon', href=faviconURL, sizes='16x16 32x32')
		link(rel='icon', type='image/png', href='//s1.wp.com/i/favicons/favicon-64x64.png', sizes='64x64')
		link(rel='icon', type='image/png', href='//s1.wp.com/i/favicons/favicon-96x96.png', sizes='96x96')
		link(rel='icon', type='image/png', href='//s1.wp.com/i/favicons/android-chrome-192x192.png', sizes='192x192')
		link(rel='apple-touch-icon', sizes='57x57', href='//s1.wp.com/i/favicons/apple-touch-icon-57x57.png')
		link(rel='apple-touch-icon', sizes='60x60', href='//s1.wp.com/i/favicons/apple-touch-icon-60x60.png')
		link(rel='apple-touch-icon', sizes='72x72', href='//s1.wp.com/i/favicons/apple-touch-icon-72x72.png')
		link(rel='apple-touch-icon', sizes='76x76', href='//s1.wp.com/i/favicons/apple-touch-icon-76x76.png')
		link(rel='apple-touch-icon', sizes='114x114', href='//s1.wp.com/i/favicons/apple-touch-icon-114x114.png')
		link(rel='apple-touch-icon', sizes='120x120', href='//s1.wp.com/i/favicons/apple-touch-icon-120x120.png')
		link(rel='apple-touch-icon', sizes='144x144', href='//s1.wp.com/i/favicons/apple-touch-icon-144x144.png')
		link(rel='apple-touch-icon', sizes='152x152', href='//s1.wp.com/i/favicons/apple-touch-icon-152x152.png')
		link(rel='apple-touch-icon', sizes='180x180', href='//s1.wp.com/i/favicons/apple-touch-icon-180x180.png')
		link(rel='profile', href='http://gmpg.org/xfn/11')
		link(rel='manifest', href='/calypso/manifest.json')
		link(rel='stylesheet', href='//s1.wp.com/i/fonts/merriweather/merriweather.css?v=20160210')
		link(rel='stylesheet', href='//s1.wp.com/i/noticons/noticons.css?v=20150727')
		link(rel='stylesheet', href='//s1.wp.com/wp-includes/css/dashicons.css?v=20150727')
		if isRTL
			link(rel='stylesheet', href=urls['style-rtl.css'])
		else
			if 'development' === env || isDebug
				link(rel='stylesheet', href=urls['style-debug.css'])
			else
				link(rel='stylesheet', href=urls['style.css'])

	body(class=isRTL ? 'rtl' : '')
		if renderedLayout
			#wpcom.wpcom-site!= renderedLayout
		else
			#wpcom.wpcom-site
				div( class=[ 'layout', 'is-group-' + sectionGroup ] )
					.masterbar
					.layout__content
						.wpcom-site__logo.noticon.noticon-wordpress
						if hasSecondary
							.layout__secondary
							ul.sidebar
						if sectionGroup === 'editor'
							div(class=['card', 'editor-ground-control'])
								.editor-ground-control__action-buttons
		if badge
			div.environment-badge
				if abTestHelper
					div(class=['environment', 'is-tests'])
				if branchName && branchName !== 'master'
					span(class=['environment', 'branch-name'], title='Commit ' + commitChecksum)=branchName
				if devDocs
					span(class=['environment', 'is-docs'])
						a(href=devDocsURL title='DevDocs') docs
				span(class=['environment', 'is-' + badge, 'is-env'])=badge
				a(class='bug-report', href=feedbackURL, title='Report an issue', target='_blank')

		script.
			(function() {
				function isSupported() {
					var ios, version, ua;

					ua = window.navigator.userAgent;

					if ( ! window.history ||
							! window.history.pushState ||
							! window.history.replaceState ||
							! ( '__proto__' in Object.prototype )
					) {
						return false;
					}

					function getFirstMatch( regex ) {
						var match = ua.match( regex );
						return ( match && match.length > 1 && match[1] ) || '';
					}

					ios = getFirstMatch( /(ipod|iphone|ipad)/i ).toLowerCase();
					version = getFirstMatch( /version\/(\d+(\.\d+)? )/i );

					if ( ios && version < 6 ) {
						// disable for now because it is breaking Chrome on iOS
						//return false;
					}

					return true;
				}

				if ( ! isSupported() ) {
					window.location = 'https://wordpress.com/browsehappy?url=' + encodeURIComponent( window.location );
				}
			})();

		if user
			script(type='text/javascript')!='var currentUser = ' + sanitize.jsonStringifyForHtml( user )
		if app
			script(type='text/javascript')!='var app = ' + sanitize.jsonStringifyForHtml( app )
		if initialReduxState
			script(type='text/javascript')!='var initialReduxState = ' + sanitize.jsonStringifyForHtml( initialReduxState )
		if config
			script(type='text/javascript')!= config
		if i18nLocaleScript
			script(src=i18nLocaleScript)
		if 'development' === env || isDebug
			script(src=urls[ 'manifest' ])
			script(src=urls[ 'vendor' ])
			script(src=urls[ jsFile ])
			if chunk
				script(src=urls[ chunk ])
		else
			script(src=urls[ 'manifest-min' ])
			script(src=urls[ 'vendor-min' ])
			script(src=urls[ jsFile + '-min' ])
			if chunk
				script(src=urls[ chunk + '-min' ])
		script(type='text/javascript')!='window.AppBoot();'

		noscript.wpcom-site__global-noscript
			|Please enable JavaScript in your browser to enjoy WordPress.com.
